<h1>Listing topics</h1>

<table>
  <tr>
    <th>Title</th>
    <th>Content</th>
    <th>User</th>
    <th>State</th>
  </tr>

<% for topics in @topics %>
  <tr>
    <td><%=h topics.title %></td>
    <td><%=h topics.content %></td>
    <td><%=h topics.user_id %></td>
    <td><%=h topics.state %></td>
    <td><%= link_to 'Show', topics %></td>
    <td><%= link_to 'Edit', edit_topics_path(topics) %></td>
    <td><%= link_to 'Destroy', topics, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New topics', new_topics_path %>
